<template>
  <div>
    <V-CommonHeaderLeft>
      <div id="app">
        <el-row>
          <!-- 头部 -->
          <div class="header">
            <el-col :span="4" class="header-nav">
              <router-link to="/">首页&nbsp;&nbsp;/</router-link>
              <router-link to="/">营销&nbsp;&nbsp;/</router-link>
              <router-link to="/">优惠券&nbsp;&nbsp;/</router-link>
              <router-link to="/">优惠券详情</router-link>
            </el-col>
          </div>
        </el-row>
        <div class="contents">
          <nav>
            <ul>
              <li @click="youHui()" :class="{active:isActive}">优惠券详情</li>
              <li @click="lingShow()" :cLass="{active:isActivee}">领取明细</li>
              <li v-show="show">导出</li>
            </ul>
          </nav>
          <div class="contents-details" v-show="showDet">
            <h3>|基本信息</h3>
            <div class="contents-details-list">
              <div class="list-left">
                <el-row class="tr">
                  <el-col :span="3">优惠券类型</el-col>
                  <el-col :span="8" :offset="2">满减券</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">优惠券名称</el-col>
                  <el-col :span="8" :offset="2">小花花</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">有效期</el-col>
                  <el-col :span="18" :offset="2">2018-09-12 00:00:00~2019-09-12 00:00:00</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">优惠券面值</el-col>
                  <el-col :span="8" :offset="2">100</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">总数量</el-col>
                  <el-col :span="8" :offset="2">10</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">每人限领</el-col>
                  <el-col :span="8" :offset="2">1</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">使用门槛</el-col>
                  <el-col :span="8" :offset="2">订单满500元可用</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">说明</el-col>
                  <el-col :span="8" :offset="2">也规定时间控制</el-col>
                </el-row>
                <el-row class="tr">
                  <el-col :span="3">状态</el-col>
                  <el-col :span="8" :offset="2">已过期</el-col>
                </el-row>
              </div>
              <div class="list-right">1000</div>
            </div>
            <div class="contents-details-goods">
              <h3>|可使用商品范围</h3>
              <el-row class="goods-tableRow">
                <el-col :span="1" style="text-align:left">序号</el-col>
                <el-col :span="5" :offset="1" style="text-indent:4em">规格图</el-col>
                <el-col :span="5" style="text-align: center;">商品名称/商品编号</el-col>
                <el-col :span="5" style="text-align: center;">规格名称/规格编号</el-col>
                <el-col :span="3" style="text-align: center;">单位</el-col>
                <el-col :span="4" style="text-align: center;">销售价</el-col>
              </el-row>
              <el-row class="goods-tableData" v-for="(site,key) in tableData" :key="key">
                <el-col :span="1" style="border-right:1px solid #e3e3e3;padding-left:10px">{{++key}}</el-col>
                <el-col
                  :span="5"
                  :offset="1"
                  style="border-right:1px solid #e3e3e3;padding-left:50px"
                >
                  <!-- <img src="" alt="">-->
                  {{site.url}}
                </el-col>
                <el-col :span="5" style="border-right:1px solid #e3e3e3;text-indent:1.5em">
                  <span>{{site.goodsName}}</span>
                  <span>{{site.goodsBian}}</span>
                </el-col>
                <el-col :span="5" style="border-right:1px solid #e3e3e3;text-indent:1.5em">
                  <span>{{site.guiName}}</span>
                  <span>{{site.guiBian}}</span>
                </el-col>
                <el-col
                  :span="3"
                  style="border-right:1px solid #e3e3e3;text-align:center"
                >{{site.dan}}</el-col>
                <el-col :span="4" style="text-align:center">￥{{site.price}}</el-col>
              </el-row>
            </div>
            <div class="fan">
              <h3>|发放范围</h3>
              <p>全部客户</p>
            </div>
          </div>
          <div style="background-color:#fff" v-show="showLing">
            <el-row>
              <el-col :span="6" class="ling-state">
                <span>总数量</span>
                <span class="span-two">10</span>
              </el-col>
              <el-col :span="6" class="ling-state">
                <span>领取人数</span>
                <span class="span-two">10</span>
              </el-col>
              <el-col :span="6" class="ling-state">
                <span>已领取</span>
                <span class="span-two">10</span>
              </el-col>
              <el-col :span="6" class="ling-state">
                <span>已使用</span>
                <span class="span-two">10</span>
              </el-col>
            </el-row>
            <!--开始列表-->
            <el-row class="tableRow">
              <el-col :span="2">名称</el-col>
              <el-col :span="3">有效期</el-col>
              <el-col :span="3">类型</el-col>
              <el-col :span="3">面值</el-col>
              <el-col :span="3">使用门槛</el-col>
              <el-col :span="2">总数量</el-col>
              <el-col :span="2">已领取</el-col>
              <el-col :span="2">已使用</el-col>
              <el-col :span="2">发放范围</el-col>
              <el-col :span="2">状态</el-col>
            </el-row>
            <div class="scroll">
              <el-row class="tableData" v-for="(site,key) in tableData2" :key="key">
                <el-col :span="2">
                  <router-link to="/marketingCouponDetails">{{site.name}}</router-link>
                </el-col>
                <el-col :span="3" class="tableData-td">{{site.youData}}</el-col>
                <el-col :span="3">{{site.type}}</el-col>
                <el-col :span="3">{{site.mianzhi}}</el-col>
                <el-col :span="3">{{site.apply}}</el-col>
                <el-col :span="2">{{site.count}}</el-col>
                <el-col :span="2">{{site.huo}}</el-col>
                <el-col :span="2">{{site.shi}}</el-col>
                <el-col :span="2">{{site.fanwei}}</el-col>
                <el-col :span="2">{{site.state}}</el-col>
              </el-row>
            </div>
          </div>
        </div>
      </div>
    </V-CommonHeaderLeft>
  </div>
</template>

<script>
import VCommonHeaderLeft from './../common/vCommonHeaderLeft/VCommonHeaderLeft'
export default {
  components: {
    VCommonHeaderLeft
  },
  data () {
    return {
      i: '',
      opacity: '',
      // 导出
      show: false,
      // 下划线
      isActive: true,
      isActivee: false,
      // 优惠券详情
      showDet: true,
      // 领取详情
      showLing: false,
      // 可使用商品范围
      tableData: [
        {
          url: '规格图',
          goodsName: '男童凉鞋',
          goodsBian: 2610,
          guiName: '颜色:棕色；尺码:28',
          dan: '双',
          price: '50.00'
        }
      ],
      tableData2: [
        {
          show: true,
          name: '小花',
          youData: '2018-06-12 00:00:00 2019-06-12 00:00:00',
          type: '满减券',
          mianzhi: 100,
          apply: '满500元可用',
          count: 10,
          huo: 0,
          shi: 0,
          fanwei: '全部客户',
          state: '未启用'
        }]
    }
  },
  methods: {
    lingShow () {
      this.isActivee = true
      this.show = true
      this.showLing = true
      this.showDet = false
      this.isActive = false
    },
    youHui () {
      this.isActive = true
      this.showDet = true
      this.showLing = false
      this.show = false
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  width: 90%;
  background-color: #f2f5f7;
  height: 100%;
  padding: 15px 10px 0px 10px;
}
.header {
  height: 45px;
  .header-nav {
    line-height: 30px;
    font-size: 12px;
    display: flex;
    justify-content: space-around;
    padding-left: 10px;
    span {
      display: inline-block;
      margin-left: 10px;
    }
    a {
      color: #999999;
    }
    a:hover {
      color: #20ade5;
    }
  }
  .header-img {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid #dce4e7;
  }
}
.header-nav a:nth-child(4) {
  color: #333;
}
.header-nav a:nth-child(4):hover {
  color: #333;
}
.contents {
  width: 100%;
  background-color: #fff;
}
nav ul {
  display: flex;
  color: #999;
  padding: 15px 0px 0px 25px;
  border-bottom: 1px solid #e3e3e3;
}
nav ul li:nth-child(1) {
  padding-bottom: 15px;
  width: 110px;
  text-align: center;
}
nav ul li:nth-child(1):hover {
  color: #20ade5;
  cursor: pointer;
}
nav ul li:nth-child(2) {
  margin-left: 20px;
  cursor: pointer;
}
nav ul li:nth-child(2):hover {
  color: #20ade5;
}
.active {
  border-bottom: 2px solid #20ade5;
  padding-bottom: 15px;
  text-align: center;
  font-weight: bold;
  color: #20ade5;
}
.activee {
  border-bottom: 2px solid #20ade5;
  padding-bottom: 15px;
  text-align: center;
  font-weight: bold;
  color: #20ade5;
}
nav ul li:nth-child(3) {
  margin-left: 75%;
  color: #20ade5;
}
.contents-details {
  padding: 20px 0px 40px 25px;
  overflow-x: hidden;
  overflow-y: scroll;
  height: 440px;
  margin-bottom: 20px;
}
.contents-details h3 {
  font-size: 16px;
  border-bottom: 1px solid #e3e3e3;
  margin-right: 20px;
  padding-bottom: 10px;
}
.contents-details-list {
  display: flex;
}
.list-left {
  width: 60%;
}
.tr {
  height: 60px;
  line-height: 60px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 12px;
  padding-left: 5px;
}
.contents-details-goods {
  margin-top: 70px;
}
.contents-details-goods > h3 {
  margin: 0px 20px;
  border-bottom: 1px solid #e3e3e3;
}
.goods-tableRow {
  padding-left: 20px;
  line-height: 50px;
  background-color: #fcfcfc;
  border: 1px solid #e3e3e3;
  margin: 20px 20px 0px 20px;
  font-size: 12px;
  // text-align: center;
}
.goods-tableData {
  padding-left: 20px;
  font-size: 12px;
  margin: 0px 20px 0px 20px;
  height: 80px;
  line-height: 80px;
  border: 1px solid #e3e3e3;
  border-top: 0;
}
.fan {
  margin-top: 30px;
}
.fan > h3 {
  margin: 0px 20px;
  border-bottom: 1px solid #e3e3e3;
}
.fan > p {
  font-size: 14px;
  margin: 20px 0px 0px 20px;
}
.ling-state {
  height: 100px;
  line-height: 30px;
  padding-left: 40px;
  color: #999999;
  padding-top: 15px;
  border-right: 1px solid #e3e3e3;
}
.span-two {
  color: #333;
  font-weight: bold;
  display: block;
}
.tableRow {
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
  height: 50px;
  background-color: #fcfcfc !important;
  line-height: 50px;
  font-size: 12px;
  color: #666;
  padding-left: 20px;
}
.tableData {
  border-top: 0;
  border-bottom: 1px solid #e3e3e3;
  height: 70px;
  background-color: #fff !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 70px;
  font-size: 12px;
  padding-left: 20px;
}
.tableData-td {
  line-height: 30px;
}
</style>
